Carbon


GetFrontProcess

Header: Processes.h Carbon status: Supported

Gets the process serial number of the front process.

OSErr GetFrontProcess (
    ProcessSerialNumber *PSN
);
Parameter descriptions
PSN

On return, a pointer to the process serial number of the process running in the foreground.

function result

A result code. If no process is running in the foreground, GetFrontProcess returns the result code procNotFound.

DISCUSSION

You can use this function to determine if your process or some other process is in the foreground. You can use the process serial number returned in the PSN parameter in other Process Manager functions.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)